package com.gzc.just.play.last.war.sceneserver.battle.model;

import java.io.Serializable;
import java.util.Objects;

/**
 * BattleUserInfo的复合主键类
 * 由battleId和userId组成
 */
public class BattleUserInfoId implements Serializable {
    
    private static final long serialVersionUID = 1L;
    
    private Long battleId;
    private Long userId;
    
    public BattleUserInfoId() {
    }
    
    public BattleUserInfoId(Long battleId, Long userId) {
        this.battleId = battleId;
        this.userId = userId;
    }
    
    public Long getBattleId() {
        return battleId;
    }
    
    public void setBattleId(Long battleId) {
        this.battleId = battleId;
    }
    
    public Long getUserId() {
        return userId;
    }
    
    public void setUserId(Long userId) {
        this.userId = userId;
    }
    
    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        BattleUserInfoId that = (BattleUserInfoId) o;
        return Objects.equals(battleId, that.battleId) && 
               Objects.equals(userId, that.userId);
    }
    
    @Override
    public int hashCode() {
        return Objects.hash(battleId, userId);
    }
}